# QMAKE Configuration file
# Copyright (c) 2007-2010, WOSH - Wide Open Smart Home 
# by Alessandro Polo - OpenSmartHome.com
# All rights reserved.
#######################################################
# Revision $Id: core.pro 2835 2010-08-03 01:28:00Z alex $
#######################################################

message( "WOSH - CORE" )
DEFINES += WOSH_CORE

HEADERS += core/Bundle.h
HEADERS += core/BundleGeneric.h
SOURCES += core/BundleGeneric.cpp
HEADERS += core/BundleGenericWorker.h
HEADERS += core/BundleLoader.h
SOURCES += core/BundleLoader.cpp
HEADERS += core/BundleManager.h
SOURCES += core/BundleManager.cpp
HEADERS += core/BundleRequirements.h
SOURCES += core/BundleRequirements.cpp

HEADERS += core/Bus.h
SOURCES += core/Bus.cpp
HEADERS += core/BusMT.h
SOURCES += core/BusMT.cpp
HEADERS += core/BusRing.h
SOURCES += core/BusRing.cpp
HEADERS += core/BusConnector.h
SOURCES += core/BusConnector.cpp
HEADERS += core/BusManager.h
SOURCES += core/BusManager.cpp

HEADERS += core/Containers.h

HEADERS += core/Communicator.h

HEADERS += core/DataFields.h

HEADERS += core/DataHash.h
SOURCES += core/DataHash.cpp

HEADERS += core/DataMining.h

HEADERS += core/DataModels.h

HEADERS += core/Device.h
HEADERS += core/DeviceManager.h
SOURCES += core/DeviceManager.cpp

HEADERS += core/EncoderProtocol.h
SOURCES += core/EncoderProtocol.cpp

HEADERS += core/Fact.h
SOURCES += core/Fact.cpp

HEADERS += core/FilePath.h
SOURCES += core/FilePath.cpp
HEADERS += core/FileSystem.h
SOURCES += core/FileSystem.cpp

HEADERS += core/Interpreter.h

HEADERS += core/InterfacesProvider.h
SOURCES += core/InterfacesProvider.cpp

HEADERS += core/List.h
SOURCES += core/List.cpp

HEADERS += core/LogContext.h
SOURCES += core/LogContext.cpp
HEADERS += core/LogHandlers.h
SOURCES += core/LogHandlers.cpp

HEADERS += core/Message.h
SOURCES += core/Message.cpp

HEADERS += core/MessageContent.h
SOURCES += core/MessageContent.cpp
HEADERS += core/MessageContentGeneric.h

HEADERS += core/MessageFilter.h
SOURCES += core/MessageFilter.cpp

HEADERS += core/MessageProcessingCommon.h
SOURCES += core/MessageProcessingCommon.cpp

HEADERS += core/MessageQueue.h
SOURCES += core/MessageQueue.cpp

HEADERS += core/MessageNetworkForwarding.h

HEADERS += core/Method.h
SOURCES += core/Method.cpp
HEADERS += core/MethodArguments.h
SOURCES += core/MethodArguments.cpp
HEADERS += core/MethodsCommon.h
SOURCES += core/MethodsCommon.cpp
HEADERS += core/MethodsProvider.h
SOURCES += core/MethodsProvider.cpp 
HEADERS += core/MethodT.h

HEADERS += core/Mutex.h

HEADERS += core/NetworkChannel.h
SOURCES += core/NetworkChannel.cpp
HEADERS += core/NetworkManager.h
SOURCES += core/NetworkManager.cpp
HEADERS += core/NetworkManagerHelpers.h
HEADERS += core/NetworkProtocol.h
SOURCES += core/NetworkProtocol.cpp

HEADERS += core/Notification.h
SOURCES += core/Notification.cpp

HEADERS += core/Object.h
SOURCES += core/Object.cpp
HEADERS += core/ObjectAllocator.h
SOURCES += core/ObjectAllocator.cpp
HEADERS += core/ObjectFactory.h
SOURCES += core/ObjectFactory.cpp

HEADERS += core/Permission.h
SOURCES += core/Permission.cpp

HEADERS += core/PersistenceManager.h
SOURCES += core/PersistenceManager.cpp

HEADERS += core/PropertiesProvider.h
SOURCES += core/PropertiesProvider.cpp 
HEADERS += core/Property.h
SOURCES += core/Property.cpp

HEADERS += core/Reflection.h

HEADERS += core/Request.h
SOURCES += core/Request.cpp

HEADERS += core/ResourcePath.h
SOURCES += core/ResourcePath.cpp

HEADERS += core/Response.h
SOURCES += core/Response.cpp

HEADERS += core/SecurityFirewall.h
SOURCES += core/SecurityFirewall.cpp

HEADERS += core/SecurityManager.h
SOURCES += core/SecurityManager.cpp
HEADERS += core/SecurityToken.h
SOURCES += core/SecurityToken.cpp

HEADERS += core/Session.h
SOURCES += core/Session.cpp
HEADERS += core/SessionProtocol.h
SOURCES += core/SessionProtocol.cpp
HEADERS += core/SessionManager.h
SOURCES += core/SessionManager.cpp

HEADERS += core/Settings.h
SOURCES += core/Settings.cpp

HEADERS += core/Serialization.h
SOURCES += core/Serialization.cpp

HEADERS += core/SharedMemory.h
SOURCES += core/SharedMemory.cpp
HEADERS += core/SharedMemoryDsm.h
SOURCES += core/SharedMemoryDsm.cpp
HEADERS += core/SharedMemoryEpidemic.h
SOURCES += core/SharedMemoryEpidemic.cpp
HEADERS += core/SharedObject.h
SOURCES += core/SharedObject.cpp
HEADERS += core/SharedTransaction.h
SOURCES += core/SharedTransaction.cpp

HEADERS += core/SystemError.h
SOURCES += core/SystemError.cpp

HEADERS += core/SystemLogger.h
SOURCES += core/SystemLogger.cpp

HEADERS += core/SystemMonitor.h
SOURCES += core/SystemMonitor.cpp
HEADERS += core/SystemProfiler.h
SOURCES += core/SystemProfiler.cpp


HEADERS += core/Table.h
SOURCES += core/Table.cpp

HEADERS += core/Thread.h
SOURCES += core/Thread.cpp

HEADERS += core/ThreadManager.h
SOURCES += core/ThreadManager.cpp

HEADERS += core/ThreadMethod.h
HEADERS += core/ThreadPool.h

HEADERS += core/Timer.h
SOURCES += core/Timer.cpp

HEADERS += core/Tree.h
SOURCES += core/Tree.cpp

HEADERS += core/Variant.h
SOURCES += core/Variant.cpp

HEADERS += core/URI.h
SOURCES += core/URI.cpp

HEADERS += core/User.h
SOURCES += core/User.cpp
HEADERS += core/UserGroup.h
HEADERS += core/UserInfoCommmunicators.h
HEADERS += core/UserInfoLocation.h
HEADERS += core/UserManager.h
SOURCES += core/UserManager.cpp

HEADERS += core/Utilities.h
SOURCES += core/Utilities.cpp

HEADERS += core/WoshHost.h
SOURCES += core/WoshHost.cpp

HEADERS += core/WoshKernel.h
SOURCES += core/WoshKernel.cpp
HEADERS += core/WoshModule.h
SOURCES += core/WoshModule.cpp

##################################################### UTILS

!include( core/utils/utils.pro ) {
	message( "*****  No core/utils/utils.pro file found. *****" )
	message( "*****  FAILED *****" )
} 

#####################################################
#####################################################

!win32-g++ {
 unix {
	message( "WOSH - CORE [+POSIX layer]" )
	HEADERS += core/posix/desktop.h
	SOURCES += core/posix/desktop.cpp
	HEADERS += core/posix/processes.h
	SOURCES += core/posix/processes.cpp

	INCLUDE_PTHREAD {
		LIBS += -lpthread
		HEADERS += core/posix/pthread_mutex.h
		HEADERS += core/posix/pthread_thread.h
		SOURCES += core/posix/pthread_thread.cpp
	 }
 }
}

!winCE {
 win32|win32-g++ {
	message( "WOSH - CORE [+Win32 layer]" )
	HEADERS += core/win32/dirent.h
	SOURCES += core/win32/dirent.c

	LIBS += -lpsapi
	HEADERS += core/win32/desktop.h
	SOURCES += core/win32/desktop.cpp
	HEADERS += core/win32/processes.h
	SOURCES += core/win32/processes.cpp
	HEADERS += core/win32/utils.h
	SOURCES += core/win32/utils.cpp

	INCLUDE_THREAD_WIN32 {
		HEADERS += core/win32/win32_mutex.h
		HEADERS += core/win32/win32_thread.h
		SOURCES += core/win32/win32_thread.cpp
	 }
 }
}

winCE {
	message( "WOSH - CORE [+WinCE layer]" )
	# fix WinCE missing stdlib (time functions)
	HEADERS += core/wince/time_ce.h
	SOURCES += core/wince/time_ce.cpp
	HEADERS += core/wince/time_ce.h
	SOURCES += core/wince/time_ce.cpp

	SOURCES += core/wince/stringutils.cpp
	HEADERS += core/wince/vectorutils.h
	SOURCES += core/wince/stringutils.cpp
	HEADERS += core/wince/vectorutils.h

	HEADERS += core/wince/desktop.h
	SOURCES += core/wince/desktop.cpp

#	LIBS += coredll.lib
	LIBS += -lcoredll
	HEADERS += core/wince/processes.h
	SOURCES += core/wince/processes.cpp
}

